import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 列表
export const propertyList = (params) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/dlr/majorProject/getFollowInfoList`, { params });

// 项目信息详情
export const propertyInfo = (id) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/dlr/majorProject/${id}`);

// 联系人信息列表
export const contactList = (params) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectContact/queryList`, { params });

// 意向汽车信息
export const carInfo = (params) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectModel/queryList`, { params });

// 添加意向汽车信息
export const addCarInfo = (params, projectId) => axios.post(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectModel/insertList/${projectId}`, params);

// 删除意向汽车信息
export const delCarInfo = (id) => axios.delete(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectModel/delete/${id}`);

// 修改意向汽车信息
export const updateCarInfo = (params, projectId) => axios.put(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectModel/${projectId}`, params);

// 删除联系人信息
export const delcontact = (id) => axios.delete(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectContact/${id}`);

// 修改联系人信息
export const updateContactInfo = (params, id) => axios.put(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectContact/${id}`, params);

// 添加联系人信息
export const addContactInfo = (params) => axios.post(`${SERVER.CMSCLOUD_BIGCUSTOMER}/major/majorProjectContact`, params);

// 跟进历史信息列表
export const followInfo = (params) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectFollow/queryList`, { params });

// 修改历史信息
export const updateFollowInfo = (params, id) => axios.put(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectFollow/${id}`, params);

// 添加历史信息
export const addFollowInfo = (params) => axios.post(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectFollow`, params);

// 删除历史信息
export const delFollow = (id) => axios.delete(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectFollow/${id}`);

// 申请列表
export const applyInfo = (params) => axios.get(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectApply/queryList`, { params });

// 申请列表
export const addApply = (params) => axios.post(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectApply`, params);

// 上传附件
export const updateFile = (params, id) => axios.post(`${SERVER.CMSCLOUD_BIGCUSTOMER}/projectfollow/majorProjectFollow/updateFile/${id}`, params);
